import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from '../views/index/Index.vue'
import Layout from '../views/layout/layout.vue'

Vue.use(VueRouter)

  const routes = [
  {
    path: '/',
    name: 'layout',
    component: Layout,
    redirect:'/index',
    children:[
      {
        path:'index',
        component:Index,
        name:'index'
      }
    ]
  }
  
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
